Generating Necklaces

نویسندگان

  • Frank Ruskey
  • Carla D. Savage
  • Terry Min Yih Wang
چکیده

A k color n bead necklace is an equivalence class of k ary n tuples under rotation In this paper we analyze an algorithm due to Fredricksen Kessler and Maiorana FKM to show that necklaces can be generated in constant amortized time We also present a new approach to generating necklaces which we conjecture can also be implemented in constant amortized time The FKM algorithm generates a list of n tuples which includes among other things the lexicographically smallest element of each k color n bead necklace Previously it had been shown only that the list contains at most O n N k n elements where N k n is the number of k color n bead necklaces and that successive elements can be generated in worst case time O n giving a bound of O n N k n on the time for the algorithm We show that the number of elements generated by the FKM algorithm approaches k k N k n and the total time is only O N k n A by product of our analysis is a precise characterization of the list generated by FKM which makes a recursive description possible

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fast Algorithms to Generate Necklaces, Unlabeled Necklaces, and Irreducible Polynomials over GF(2)

Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an Ž . equivalence class of k-ary strings under rotation the cyclic group . A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algoŽ . rit...

متن کامل

A Gray Code for Necklaces of Fixed Density

A necklace is an equivalence class of binary strings under rotation In this paper we present a Gray code listing of all n bit necklaces with d ones so that i each necklace is listed exactly once by a representative from its equivalence class and ii successive representatives including the last and the rst in the list di er only by the transposition of two bits The total time required is O nN n ...

متن کامل

Gray codes for necklaces and Lyndon words of arbitrary base

Recently, a Gray code for unrestricted binary necklaces and their relatives was discovered by Vajnovszki [Discrete Mathematics & Theoretical Computer Science, to appear]. The Gray code is constructed by modifying the classical FKM algorithm for generating necklaces in lexicographic order. We present a generalisation of Vajnovszki’s algorithm, giving a Gray code for necklaces and their relatives...

متن کامل

A New Algorithm for Generating Necklaces

In this paper we present an algorithm for generating the lexicographi cally smallest representatives of all the n bead necklaces in k colors The time required is O nN k where N n k is the number of necklaces with n beads of k colors To our knowledge this is the rst algorithm for this problem which has been proved to asymptotically improve the obvious O n k approach of examining all k ary n tupl...

متن کامل

A New Algorithm for Generating

In this paper we present an algorithm for generating the lexicographi-cally smallest representatives of all the n-bead necklaces in k-colors. The time required is O(nN n k), where N n k is the number of necklaces with n beads of k colors. To our knowledge, this is the rst algorithm for this problem which has been proved to asymptotically improve the obvious O(n k n) approach of examining all k-...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Algorithms

دوره 13  شماره 

صفحات  -

تاریخ انتشار 1992